import request from '@/config/axios'

// 患者基本信息列表
export const getBaseInfoList = (data: any) => {
  return request.post({ url: '/business/patients/page', data })
}

// 获得基本信息详情
export const getPatientDetail = async (id: string) => {
  return await request.get({ url: '/business/patients/get?id='+id})
}

// 通过患者编号获得基本信息详情
export const getPatientDetailByPatientCode = async (patientCode: string) => {
  return await request.get({ url: '/business/patients/getByPatientCode?patientCode='+patientCode})
}

// 通过新筛查患者id获得患者基本信息详情
export const getPatientDetailByReportPatientInfoId = async (id: string) => {
  return await request.get({ url: '/business/patients/getByReportPatientInfoId?id='+id})
}

// 获得五保一mock数据
export const getMockDetail = async (data: any) => {
  return request.post({ url: 'https://m1.apifoxmock.com/m1/6346393-0-default/getMock', data })
}

// 导出模板
export const exportPost = async (params) => {
  return await request.download({ url: '/business/patients/export-excel', params })
}
